package com.lianbang.staff.model

import cn.ubest.mvvmcore.base.BaseModel
import cn.ubest.mvvmcore.bean.ListWrapper
import cn.ubest.mvvmcore.bean.ResultWrapper
import cn.ubest.mvvmcore.bean.Wrapper
import com.lianbang.staff.bean.*
import com.lianbang.staff.http.api.HomeApi
import com.lianbang.staff.http.api.ShopApi
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.POST

/**
 * Created by maoqi on 2021/1/14.
 */
class ShopModel : BaseModel() {
    private val c = ShopApi::class.java


    suspend fun getShopList(
        keyword: String,
        page: Int,
        limit: Int,
        order: String
    ): ListWrapper<ShopListBean> {
        return createService(c).getShopList(keyword, page, limit, order)
    }

    suspend fun getShopDetail(
        uid: Int
    ): ResultWrapper<ShopDetailBean> {
        return createService(c).getShopDetail(uid)
    }

    suspend fun getShopOrderList(
        uid: Int,
        keyword: String,
        page: Int,
        limit: Int,
        order: String
    ): ListWrapper<ShopOrderListBean> {
        return createService(c).getShopOrderList(uid, keyword, page, limit, order)
    }

}